<?php
if (!defined('ABSPATH')) {
	define('ABSPATH', dirname(dirname(__FILE__)) . '/');
}

require_once ABSPATH . 'dr-config.php';
require_once ABSPATH . DRINC . '/dr-base.php';
require_once ABSPATH . DRINC . '/dr-functions.php';


$match_str = dr_post('match_str');

if (!empty($match_str)) {

	$user_id = dr_is_login_on();

	$posts['user_id'] = $user_id;
	$posts['action'] = 'get_all_tags';
	$posts['order'] = 'number';
	$posts['rank'] = '';
	$posts['match_str'] = $match_str;

	$result = dr_server_request('dr-app-tags.php', $posts);
	echo $result;
} else {
	echo 0;
}